/**
 * @file rank/elementary/luogu1046/main.cpp
 * @brief
 * @see
 * @author Ruiming Guo (guoruiming@stu.scu.edu.cn)
 * @copyright 2022
 * @date 2022/7/7 13:20:50
 **/

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
int a[11];
int main() {
  // High rating and good luck!
  for (int i = 0; i < 10; ++i) cin >> a[i];
  int h;
  cin >> h;
  int cnt = 0;
  for (int i = 0; i < 10; ++i) {
    if (h + 30 >= a[i]) cnt++;
  }
  cout << cnt << endl;
  return 0;
}
